<%@ page language="java" contentType="text/html;charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="zh-cn" class="no-js">
<!--<![endif]-->
<head>

<jsp:include page="../common/common.jsp" />
<link rel="stylesheet" type="text/css"
	href="${path}/assets/plugins/select2/select2.css" />
<link rel="stylesheet" type="text/css"
	href="${path}/assets/plugins/select2/select2-metronic.css" />
</head>
<body class="page-header-fixed">
<script type="text/javascript" src="${path }/layer/layer.js"></script>
	<!-- BEGIN HEADER -->
	<jsp:include page="../common/header.jsp" />
	<div class="clearfix"></div>
	<!-- BEGIN CONTAINER -->
	<div class="page-container">
		<div class="page-sidebar-wrapper"><jsp:include
				page="../common/menu.jsp" /></div>

			  <div class="page-content-wrapper">
        <div class="page-content">
				<!-- BEGIN PAGE CONTENT-->
				<div class="row">
					<div class="col-md-12">
						<!-- BEGIN EXAMPLE TABLE PORTLET-->
						<div class="portlet box purple">
							<div class="portlet-title">
								<div class="caption">
									<i class="fa fa-file-text-o"></i> 列表
								</div>
								   <div class="tools">
		                             <div class="actions">
		                                <a href="#"  onclick="epeRedPacket(${chat.rpType})"  id="exportExcel"  class="btn green"><i class="fa fa-plus"> 导出Excel</i></a>
		                              </div> 
                           			</div> 
							</div>
							<div class="portlet-body">
								<form id="formQuery" class="form-horizontal"
									action="${path}/live/list">
									<input type="hidden"  name="rpType"  id="rpType"  value="${chat.rpType}">
									<div class="form-body">
										<div class="form-group">
											<label class="col-md-1 control-label">昵称:</label>
											<div class="col-md-2">
												<input type="text" id="userNickName" name="userNickName"
													class="form-control" />
											</div>
											<label class="col-md-1 control-label">支付时间:</label>
                                        	<div class="col-md-4">
	                                            <div class="input-group input-large date-picker input-daterange"
	                                                 data-date-format="yyyy-mm-dd">
	                                                <input type="text" class="form-control" id="fromDate" name="fromDate" value="${fromDate}"
	                                                       readonly="readonly" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>
	                                                <span class="input-group-addon">to</span>
	                                                <input type="text" class="form-control" id="toDate" name="toDate" value="${toDate}"
	                                                       readonly="readonly" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>
	                                            </div>
                                       		</div>
											<div class="col-md-1">
												<button type="button" class="btn green"
													onclick="getChatList()">查询</button>
											</div>	
										</div>
									</div>
									<input  type="hidden"  id="lid"  value="${chat.liveId}">
										<input  type="hidden"  id="lname"  value="${live.name}">
								</form>
									
									
									<div style="float: right;font-size: 19px;">总金额: <fmt:formatNumber type="number" value="${zs!='null'?zs:0}"  pattern="0.00" maxFractionDigits="2"/></div>
								<table class="table table-striped table-bordered table-hover"
									id="chatList"></table>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<jsp:include page="../common/footer.jsp" />
	<script type="text/javascript" src="${path}/assets/plugins/calendar/WdatePicker.js"></script>
	<script type="text/javascript" src="${path}/assets/plugins/district/linkagesel-min.js"></script>
	<c:choose>  
  
   <c:when test="${chat.rpType==4}">    
   	<script type="text/javascript" src="${path}/redPacket/js/redPacket.js"></script>  
   </c:when>  

      <c:when test="${chat.rpType==1||chat.rpType==2}">    
   	<script type="text/javascript" src="${path}/redPacket/js/redPacket2.js"></script>  
   </c:when>  
   <c:otherwise>   
    	<script type="text/javascript" src="${path}/redPacket/js/redPacket1.js"></script>  
   </c:otherwise>  
</c:choose>  
	
	<script>
		var msg = '${msg}';

		$(function() {
			if (msg)
				App.bubble(200, msg);
			$("#fromDate").val('${fromDate}');
		    $("#toDate").val('${toDate}');
		   var lid= $("#lid").val();
			getChatList();
		});
		
		function epeRedPacket(tp){
			  var lid= $("#lid").val();
			 location.href="${path}/redPacket/redPacketQueryByPage?liveId="+lid+"&rpType="+tp;
		}
	</script>
</body>
<!-- END BODY -->
</html>
